#include "fyp/shadows/None.h"

//------------------------------------------------------------------------------
// additional header includes
#include "fyp/ObjectManager.h"
#include "fyp/ResourcePool.h"

#include "fyp/render/Renderer.h"

using namespace ming::fyp::render;

//------------------------------------------------------------------------------
namespace ming
{
namespace fyp
{
namespace shadows
{
	//--------------------------------------------------------------------------
	TNone::TNone()
	{
	}
	
	//--------------------------------------------------------------------------
	TNone::~TNone()
	{
	}

	//--------------------------------------------------------------------------
	void TNone::Init(TResourcePool *resPool, TGuiManager *guiMgr)
	{
		resPool->Add<IShader>("None.Apply", make_tuple( STR("../media/shader/None.Apply2.fx"), STR("Apply") ) );
	}

	//--------------------------------------------------------------------------
	void TNone::RenderScene(
		render::IRenderer *renderer,
		TResourcePool *resPool,
		TObjectManager *objMgr)
	{
		IShader *shader = resPool->Get<IShader>("None.Apply");

		renderer->RestoreDefaultRenderTarget();

		objMgr->RenderCasterObject(renderer, shader);
		objMgr->RenderReceiverObject(renderer, shader);
	}
	
	//--------------------------------------------------------------------------
	void TNone::Final(TResourcePool *resPool)
	{
		resPool->Remove<IShader>("None.Apply");
	}

	//--------------------------------------------------------------------------
	void TNone::ChangeShadowMapSize(size_t sz)
	{
	}

	//--------------------------------------------------------------------------
	const char* TNone::GetDescription()
	{
		return "None";
	}
	
	//--------------------------------------------------------------------------
}
}
}
